package neuralmusic.brain.ga;

public class Fitness implements Comparable<Fitness>{
	double fit;

	public Fitness(double fit2) {
		fit=fit2;
	}

	@Override
	public int compareTo(Fitness o) {
		
		if (o == this) return 0;
		
		if (fit > o.fit) return 1;
		if (fit < o.fit) return -1;
	
		int i1=hashCode();
		int i2=o.hashCode();
		
		if (i1 > i2)
			return 1;
		else 
			return -1;
		
	}
	

	public String toString() {
		return Double.toString(fit);
	}


}
